<?php


namespace app\text\controller;


use think\Controller;

class HelloWorld extends Controller
{
    //初始化
    protected function initialize(){
        parent::initialize();
        echo 'init';
    }
    public function index(){
        return 'Hello World!';
    }
    public function test(){
        return '测试类！';
    }
    public function arr(){
        $data = array(
            'a'=>1,
            'b'=>2,
            'c'=>3
        );
       return json($data);
    }
    public function  abc(){
        return view();
    }

    public function det($id){
        return 'det的id:'.$id;
    }
}